<?php
/**
 * @Author: rocky
 * @Copyright: 广州拓冠科技 <http://my8m.com>
 * Date: 2019/7/20
 * Time: 17:43
 */


namespace app\shop\resource;


use app\common\resource\BaseResource;

class PtUserResoure extends BaseResource
{
    public function toArray($data)
    {
        return [
            'id' => $data['id'],
            'start_time' => $data['start_time'],
            'end_time' => $data['end_time'],
            'q_num' => $data['num'] - $data['join_num'],
            'nickname' => $data['user']['nickname'],
            'headimg' => $data['user']['headimg'],
        ];
    }
}